package com.itheima.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
//   .../param
@WebServlet("/param")
public class ParamServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("ParamServlet  execute...");
        //获取request作用域中数据
        Object name = req.getAttribute("name");
        System.out.println("name:::::"+name);
    }
}

